using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace KeyCore.Domain.Model
{
    public class Telefon
    {
        public int TelefonId { get; set; }
        public Nullable<Guid> DaneOsoboweId { get; set; }

        public TelefonTyp TelefonTyp { get; set; }
        public TelefonPrefix TelefonPrefix { get; set; }
        public int NumerTelefonu { get; set; }

        public DaneOsobowe DaneOsobowe { get; set; }
    }

    public class TelefonConfiguration :EntityTypeConfiguration<Telefon>
    {
        public TelefonConfiguration()
        {
            HasKey(k => k.TelefonId)
                .Property(p => p.TelefonId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
        }
    }
}